package com.movies.service.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;
// 新增：时间格式注解
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;


@TableName(value ="t_ticket")
@Data
public class Ticket {

    @TableId(type = IdType.AUTO)
    private Long id;
    private Long uid;
    private String uname;
    private Long mid;
    private String mname;

    @TableField("cinema_id")
    private Long cinemaId;

    @TableField("cinema_name")
    private String cinemaName;

    @TableField("cinema_address")
    private String cinemaAddress;

    @TableField("hall_name")
    private String hallName;

    @TableField("seat_label")
    private String seatLabel;

    private BigDecimal price;
    private Integer quantity;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date ttime;

    private Object status;
    private String note;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createdAt;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updatedAt;
}